/*----------------------------------------------------------------------------
Owner(s): Shane Whitfield
$Copyright: $
$Id: 

Purpose  : Controls all UI in game
----------------------------------------------------------------------------*/

#pragma once

#include "singleton.h"
#include "subsystem.h"
#include "texture.h"
#include <vector>

/*--------------------------------------------------------------------------*/
// Forward declaration.
class BBUIButton;
class BBUIElement;
class CUITimer;

/*--------------------------------------------------------------------------*/
// Class CUIMgr declaration.
class CUIMgr : public TSingleton<CUIMgr>, public CSubsystem
{
	typedef CSubsystem super;

public:
				CUIMgr();
	
	//Subsystem Overrides						
	void		OnPreWorldUpdate();
	void		OnInit();
	
	void		UIRender();
	
	void		SetGlobalTimer(float i_timeLeft);
	void		StartGlobalTimer();		
	void		PauseGlobalTimer();		
	void		StopGlobalTimer();		
	bool		IsComplete() const;
				
private:

	BBUIButton*				m_controllingElement;
	std::vector<BBUIElement*>	m_uielements;
	BBUIButton*				m_play;
	BBUIButton*				m_pause;
    CTextureCounter*        m_textureCounter;
	CUITimer*				m_globalTimer;
};

inline CUIMgr& CUIMgr_GetSingleton() { return CUIMgr::GetSingleton(); }
#define g_uimgr (CUIMgr_GetSingleton())

/*-----------------------------------EOF!-----------------------------------*/